
/*
 * @Author: XieQiu 雪球
 * @Date: 2021-05-31 10:47:33
 * @LastEditTime: 2022-01-12 10:20:21
 * @LastEditors: Please set LastEditors
 * @Description: 设施类型管理接口
 */
import xjaxios from "@/api/axios";
export default {
  /**
   * @description: 获取设施类型列表 *代表必填
   * @param {String/Number} page *
   * @param {String/Number} size *
   * @param {Object} entity {componyId: 1} *
   * @param {String} order 排序方式 ASC DESC 默认ASC
   * @param {String} sort 自定义排序方式 'createTime'
   * @return {Array}
   */
  getfacilityTypeList(param) {
    return xjaxios.post("/v3/facility/facilityType/queryPageByCondition", param);
  },

  /**
   * @description: 新增设施类型信息
   * @param {Object} formData *
   * @return {Object}
   */
  addfacilityTypeInfo(formData) {
    // formData.organizationNo = sessionStorage.organizationNo;
    return xjaxios.post("/v3/facility/facilityType/add", formData);
  },
  /**
   * @description: 编辑设施类型信息
   * @param {Object} formData *
   * @return {Object}
   */
  editfacilityTypeInfo(formData) {
    return xjaxios.post("/v3/facility/facilityType/edit", formData);
  },

  // /**
  //  * @description: 批量删除数据
  //  * @param {Array} list *
  //  * @return {Object}
  //  */
  delfacilityTypeInfo(list) {
    return xjaxios.post("/v3/facility/facilityType/delListByNo", {
      noList: list
    });
  },

  // /**
  //  * @description: 条件查询所有设施类型
  //  * @param null *
  //  * @return {Object}
  //  */
  getfacilityTypeListByCondition(params) {
    return xjaxios.post("/v3/facility/facilityType/queryByCondition", {
      // organizationNo: sessionStorage.organizationNo
      ...params,
    });
  },

  /**
   * @description: 主键查询设施类型信息
   * @param {String} unitId*
   * @return {Object}
   */
  queryfacilityTypeById(no) {
    return xjaxios.get(`/v3/facility/facilityType/queryByNo/${no}`);
  }
};
